using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace PDF_Exp
{
	/// <summary>
	/// Summary description for MainForm.
	/// </summary>
	public class MainForm : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button Btn;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public MainForm()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.Btn = new System.Windows.Forms.Button();
            this.SuspendLayout();
            // 
            // Btn
            // 
            this.Btn.Location = new System.Drawing.Point(75, 98);
            this.Btn.Name = "Btn";
            this.Btn.Size = new System.Drawing.Size(141, 45);
            this.Btn.TabIndex = 0;
            this.Btn.Text = "Test Convert";
            this.Btn.Click += new System.EventHandler(this.Btn_Click);
            // 
            // MainForm
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(292, 273);
            this.Controls.Add(this.Btn);
            this.Name = "MainForm";
            this.Text = "PDF ConverterX Test";
            this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new MainForm());
		}

		private void Btn_Click(object sender, System.EventArgs e)
		{
			PDFConverter.IPDFConverterX obj = null;
			
			Type type = Type.GetTypeFromProgID("PDFConverter.PDFConverterX");
			

			obj = (PDFConverter.IPDFConverterX)Activator.CreateInstance(type);
            obj.LogFile = "C:\\Log.txt";
			obj.Convert("C:\\test.pdf","C:\\test.htm","-c htm");
			

		}
	}
}
